home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / turbo_tk.arc / STRNGDEM.PAS < prev    next >
Pascal/Delphi Source File  |  1988-02-01  |  1KB  |  36 lines

  1. Program String_Demo;
  2.  
  3. uses CRT, StrngTTT;
  4. var
  5.     Ch : char;
  6. const
  7.     DemoStr = '  string routines developed by BOB "technoJock" ainsbury  ';
  8.  
  9. begin
  10.     Clrscr;
  11.     writeln('              ''',DemoStr,'''');
  12.     Writeln;
  13.     Writeln('Upper:  ''',Upper(DemoStr),'''');
  14.     Writeln('Lower:  ''',Lower(DemoStr),'''');
  15.     Writeln('Proper: ''',Proper(DemoStr),'''');
  16.     writeln('Total words:    ',WordCnt(DemoStr));
  17.     Writeln('Posn. word 3:   ',PosWord(3,DemoStr));
  18.     Writeln('Words 2..5 are: ''',ExtractWords(2,4,DemoStr),'''');
  19.     Writeln('Strip Leading spaces -');
  20.     Writeln(Strip('L',' ',DemoStr));
  21.     Writeln('Strip Trailing spaces -');
  22.     Writeln(Strip('R',' ',DemoStr));
  23.     Writeln('Strip Leading & Trailing spaces -');
  24.     Writeln(Strip('B',' ',DemoStr));
  25.     Writeln('Strip All spaces -');
  26.     Writeln(Strip('A',' ',DemoStr));
  27.     Writeln('The last ''o'' is in position ',LastPos('o',DemoStr));
  28.     writeln;
  29.     Writeln(Overtype(15,'Examples','OverType'),':');
  30.     Writeln(OverType(5,'TurboHolic','Bob Ainsbury'));
  31.     Writeln(OverType(3,'###','1234567890'));
  32.     TextColor(15);
  33.     Writeln('Run DemoTTT.exe for the main demo program');
  34.     Writeln('Technojocks Turbo Toolkit v4.0');
  35.     Ch := Readkey;
  36. end.